package com.htc.android.footprints.activity;

import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.State;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.TouchDelegate;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.RatingBar;
import android.widget.TextView;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.MapView.LayoutParams;
import com.htc.android.footprints.commonui.HtcDialog;
import com.htc.android.footprints.provider.FootprintManager;
import com.htc.android.footprints.utils.FootprintUtils;
import com.htc.android.footprints.utils.SettingInfo;
import com.htc.android.footprints.utils.StorageUtil;
import com.htc.android.footprints.utils.StorageUtil.OnChangeStorageListener;
import com.htc.android.footprints.utils.camera.FootprintImageManager;
import com.htc.android.footprints.view.MediaControlPanelViewMode;
import com.htc.android.footprints.vo.Category;
import com.htc.android.footprints.vo.Footprint;
import com.htc.widget.HtcAlertDialog;
import com.htc.widget.HtcAlertDialog.Builder;
import java.io.File;
import java.util.Date;

public class FootprintDetailViewActivity extends MapActivity
  implements View.OnClickListener
{
  private static final int MENU_DELETE = 1;
  private static final int MENU_EDIT = 0;
  private static final int MENU_EXPORT = 2;
  private static final int REQUEST_EDIT = 33;
  private static final String TAG = "FootprintDetailViewActivity";
  private TextView addressText;
  private ImageView buttonAddress;
  private ImageView buttonLocation;
  private ImageView buttonPhone;
  private ImageView buttonWeb;
  private ImageView categoryIcon;
  private TextView categroyData;
  private TextView connectionFailedText = null;
  private TextView latText;
  private TextView lonText;
  private ImageView mAddrDiv;
  private View mAddressPanel;
  private ImageView mBalloonView;
  private Footprint mFootprint;
  private ImageView mLocationDiv;
  private View mLocationPanel;
  private MapView mMap;
  private ImageView mMapDiv;
  private MediaControlPanelViewMode mMediaControl;
  private ImageView mMediaDiv;
  private ImageView mPhoneDiv;
  private View mPhonePanel;
  private StorageUtil mStorageUtil;
  private ImageView mTextBoxDiv;
  private ImageView mWebDiv;
  private View mWebPanel;
  private TextView phoneText;
  private ImageView photoView;
  private RatingBar rating;
  private TextView textBox;
  private TextView textCreateDate;
  private TextView textCreateTime;
  private TextView textNote;
  private TextView titleText;
  private TextView webText;

  private void handleVisibleItem()
  {
    int i = 1;
    int j = 1;
    label68: label100: label119: ViewGroup localViewGroup1;
    label138: ViewGroup localViewGroup2;
    if ((this.mFootprint.mAddr != null) && (this.mFootprint.mAddr.length() > 0))
    {
      showAddressPanel(true);
      i = 0;
      j = 0;
      if ((this.mFootprint.mTel == null) || (this.mFootprint.mTel.length() <= 0))
        break label218;
      showphonePanel(true);
      i = 0;
      j = 0;
      if ((this.mFootprint.mSite == null) || (this.mFootprint.mSite.length() <= 0))
        break label226;
      showWebPanel(true);
      i = 0;
      j = 0;
      if (!FootprintUtils.checkAudioData(this.mFootprint))
        break label234;
      showMediaPanel(true);
      i = 0;
      j = 0;
      if (this.mFootprint.mAccuracy <= 0)
        break label242;
      showMapPanel(true);
      i = 0;
      j = 0;
      localViewGroup1 = (ViewGroup)findViewById(2131492915);
      localViewGroup2 = (ViewGroup)findViewById(2131492937);
      if (i == 0)
        break label250;
      localViewGroup1.setVisibility(8);
      label169: if ((this.mFootprint.mComment == null) || (this.mFootprint.mComment.length() <= 0))
        break label258;
      showNotesPanel(true);
      j = 0;
      label199: if (j == 0)
        break label266;
      localViewGroup2.setVisibility(0);
    }
    while (true)
    {
      return;
      showAddressPanel(false);
      break;
      label218: showphonePanel(false);
      break label68;
      label226: showWebPanel(false);
      break label100;
      label234: showMediaPanel(false);
      break label119;
      label242: showMapPanel(false);
      break label138;
      label250: localViewGroup1.setVisibility(0);
      break label169;
      label258: showNotesPanel(false);
      break label199;
      label266: localViewGroup2.setVisibility(8);
    }
  }

  private boolean networkConnected()
  {
    int i = 1;
    ConnectivityManager localConnectivityManager = (ConnectivityManager)getSystemService("connectivity");
    if (localConnectivityManager != null)
    {
      NetworkInfo localNetworkInfo = localConnectivityManager.getActiveNetworkInfo();
      if ((localNetworkInfo == null) || (localNetworkInfo.getState() != NetworkInfo.State.CONNECTED))
        break label37;
    }
    while (true)
    {
      return i;
      label37: i = 0;
    }
  }

  private void openMapView()
  {
    if (this.mMap == null);
    while (true)
    {
      return;
      ImageButton localImageButton = (ImageButton)getLayoutInflater().inflate(2130903044, null);
      localImageButton.setClickable(true);
      localImageButton.setBackgroundResource(2130837542);
      localImageButton.setImageResource(2130837674);
      localImageButton.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
      this.mMap.addView(localImageButton, new MapView.LayoutParams(getResources().getDimensionPixelSize(2131296273), getResources().getDimensionPixelSize(2131296272), this.mMap.getWidth() - 5, this.mMap.getHeight() - 5, 85));
      ((LinearLayout)findViewById(2131492934)).setTouchDelegate(new TouchDelegate(new Rect(0, 0, 320, 480), localImageButton));
      localImageButton.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramView)
        {
          Intent localIntent = new Intent("com.htc.android.footprints.activity.WrapShowOnMapActivity");
          localIntent.putExtra("target", FootprintDetailViewActivity.this.mFootprint);
          localIntent.putExtra("DETAILVIEW", true);
          localIntent.addFlags(4194304);
          localIntent.addFlags(67108864);
          FootprintDetailViewActivity.this.startActivity(localIntent);
        }
      });
      if ((networkConnected()) || (this.connectionFailedText != null))
        continue;
      this.connectionFailedText = new TextView(this);
      this.connectionFailedText.setText(2131361937);
      this.connectionFailedText.setTextColor(-13421773);
      this.connectionFailedText.setPadding(10, 5, 10, 5);
      this.mMap.addView(this.connectionFailedText, new MapView.LayoutParams(-1, -2, 0, 0, 51));
    }
  }

  private void showAddressPanel(boolean paramBoolean)
  {
    if (!paramBoolean)
    {
      this.mAddressPanel.setVisibility(8);
      this.mAddrDiv.setVisibility(8);
    }
    while (true)
    {
      return;
      this.mAddressPanel.setVisibility(0);
      this.mAddrDiv.setVisibility(0);
    }
  }

  private void showLocationPanel(boolean paramBoolean)
  {
    if (!paramBoolean);
  }

  private void showMapPanel(boolean paramBoolean)
  {
    ViewGroup localViewGroup1 = (ViewGroup)findViewById(2131492933);
    ViewGroup localViewGroup2 = (ViewGroup)findViewById(2131492929);
    if (!paramBoolean)
    {
      if (this.mMapDiv != null)
        this.mMapDiv.setVisibility(8);
      localViewGroup1.setVisibility(8);
      localViewGroup2.setVisibility(8);
    }
    while (true)
    {
      return;
      if (this.mMapDiv != null)
        this.mMapDiv.setVisibility(0);
      localViewGroup1.setVisibility(0);
      localViewGroup2.setVisibility(0);
    }
  }

  private void showMediaPanel(boolean paramBoolean)
  {
    if (!paramBoolean)
    {
      this.mMediaControl.setVisibility(8);
      this.mMediaDiv.setVisibility(8);
    }
    while (true)
    {
      return;
      this.mMediaControl.setVisibility(0);
      this.mMediaDiv.setVisibility(0);
    }
  }

  private void showNotesPanel(boolean paramBoolean)
  {
    FrameLayout localFrameLayout = (FrameLayout)findViewById(2131492935);
    if (!paramBoolean)
      localFrameLayout.setVisibility(8);
    while (true)
    {
      return;
      localFrameLayout.setVisibility(0);
    }
  }

  private void showWebPanel(boolean paramBoolean)
  {
    if (!paramBoolean)
    {
      this.mWebPanel.setVisibility(8);
      this.mWebDiv.setVisibility(8);
    }
    while (true)
    {
      return;
      this.mWebPanel.setVisibility(0);
      this.mWebDiv.setVisibility(0);
    }
  }

  private void showphonePanel(boolean paramBoolean)
  {
    if (!paramBoolean)
    {
      this.mPhonePanel.setVisibility(8);
      this.mPhoneDiv.setVisibility(8);
    }
    while (true)
    {
      return;
      this.mPhonePanel.setVisibility(0);
      this.mPhoneDiv.setVisibility(0);
    }
  }

  private void updateView()
  {
    this.titleText.setText(this.mFootprint.mName);
    java.text.DateFormat localDateFormat1 = android.text.format.DateFormat.getDateFormat(getApplicationContext());
    this.textCreateDate.setText(localDateFormat1.format(new Date(this.mFootprint.mCreateTime)));
    java.text.DateFormat localDateFormat2 = android.text.format.DateFormat.getTimeFormat(getApplicationContext());
    this.textCreateTime.setText(localDateFormat2.format(new Date(this.mFootprint.mCreateTime)));
    Category localCategory = FootprintManager.getInstance(getApplicationContext()).findCategory(this.mFootprint.mCategory);
    if (localCategory != null)
      this.categoryIcon.setImageDrawable(FootprintUtils.getCategoryIcon(this, localCategory.mKeyword));
    String str;
    boolean bool1;
    label193: boolean bool2;
    label246: ImageView localImageView3;
    if (localCategory != null)
    {
      TextView localTextView = this.categroyData;
      if (localCategory.mName != null)
      {
        str = localCategory.mName;
        localTextView.setText(str);
      }
    }
    else
    {
      this.addressText.setText(this.mFootprint.mAddr);
      ImageView localImageView1 = this.buttonAddress;
      if ((this.mFootprint.mAddr == null) || (this.mFootprint.mAddr.length() <= 0))
        break label607;
      bool1 = true;
      localImageView1.setEnabled(bool1);
      this.phoneText.setText(this.mFootprint.mTel);
      ImageView localImageView2 = this.buttonPhone;
      if ((this.mFootprint.mTel == null) || (this.mFootprint.mTel.length() <= 0))
        break label613;
      bool2 = true;
      localImageView2.setEnabled(bool2);
      this.buttonPhone.setOnClickListener(this);
      this.webText.setText(this.mFootprint.mSite);
      localImageView3 = this.buttonWeb;
      if ((this.mFootprint.mSite == null) || (this.mFootprint.mSite.length() <= 0))
        break label619;
    }
    label607: label613: label619: for (boolean bool3 = true; ; bool3 = false)
    {
      localImageView3.setEnabled(bool3);
      this.buttonWeb.setOnClickListener(this);
      this.photoView = ((ImageView)findViewById(2131492906));
      File localFile = null;
      if (this.mFootprint.mPicPath != null)
        localFile = new File(this.mFootprint.mPicPath);
      Bitmap localBitmap = FootprintImageManager.getInstance().getScaledImage(localFile, this, 120, 120, false);
      this.photoView.setImageBitmap(localBitmap);
      this.rating.setRating(this.mFootprint.mRate);
      Log.d("FootprintDetailViewActivity", "mFootprint.mLatitude = " + this.mFootprint.mLatitude);
      Log.d("FootprintDetailViewActivity", "mFootprint.mLongitude = " + this.mFootprint.mLongitude);
      this.latText.setText(FootprintUtils.getFormatedLat(this.mFootprint.mLatitude));
      this.lonText.setText(FootprintUtils.getFormatedLon(this.mFootprint.mLongitude));
      this.mMap.getController().setCenter(this.mFootprint.getPoint());
      this.mMap.removeView(this.mBalloonView);
      this.mMap.addView(this.mBalloonView, new MapView.LayoutParams(40, 40, this.mFootprint.getPoint(), 81));
      this.mMap.invalidate();
      this.textBox.setText(this.mFootprint.mComment);
      this.mMediaControl.setAudioData(this.mFootprint);
      handleVisibleItem();
      return;
      str = "";
      break;
      bool1 = false;
      break label193;
      bool2 = false;
      break label246;
    }
  }

  protected boolean isRouteDisplayed()
  {
    return false;
  }

  protected void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent)
  {
    if (paramInt1 == 33)
    {
      if (paramIntent.getBooleanExtra("EXTRA_DELETE_FROM_EDIT", false) == true)
        finish();
      if (paramIntent.getParcelableExtra("DATA") != null)
      {
        this.mFootprint = ((Footprint)paramIntent.getParcelableExtra("DATA"));
        updateView();
      }
    }
  }

  public void onClick(View paramView)
  {
    if (paramView == this.buttonPhone)
    {
      Intent localIntent = new Intent("android.intent.action.CALL");
      localIntent.setData(Uri.parse("tel:" + this.mFootprint.mTel));
      startActivity(localIntent);
    }
    while (true)
    {
      return;
      if (paramView == this.buttonAddress)
      {
        if (this.mFootprint.mAccuracy <= 0)
          continue;
        int j = this.mMap.getZoomLevel();
        double d3 = this.mFootprint.mLatitude / 1000000.0D;
        double d4 = this.mFootprint.mLongitude / 1000000.0D;
        startActivity(new Intent("android.intent.action.VIEW", Uri.parse("google.streetview:" + "cbll=" + String.valueOf(d3) + "," + String.valueOf(d4) + "&cbp=1,0,,0,1.0&mz=" + String.valueOf(j - 1))));
        continue;
      }
      if (paramView == this.buttonLocation)
      {
        if (this.mFootprint.mAccuracy <= 0)
          continue;
        int i = this.mMap.getZoomLevel();
        double d1 = this.mFootprint.mLatitude / 1000000.0D;
        double d2 = this.mFootprint.mLongitude / 1000000.0D;
        startActivity(new Intent("android.intent.action.VIEW", Uri.parse("geo:" + String.valueOf(d1) + "," + String.valueOf(d2) + "?z=" + String.valueOf(i - 1))));
        continue;
      }
      if ((paramView != this.buttonWeb) || (this.mFootprint.mSite.length() < 5))
        continue;
      String str = "";
      if ((!this.mFootprint.mSite.toLowerCase().startsWith("http:")) && (!this.mFootprint.mSite.toLowerCase().startsWith("https:")))
        str = "http://";
      startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str + this.mFootprint.mSite)));
    }
  }

  protected void onCreate(Bundle paramBundle)
  {
    Log.i("FootprintDetailViewActivity", "onCreate");
    super.onCreate(paramBundle);
    requestWindowFeature(1);
    setVolumeControlStream(3);
    setContentView(2130903055);
    SettingInfo localSettingInfo = SettingInfo.getInstance(this);
    if (localSettingInfo.isFirstLaunch())
    {
      new HtcDialog(this).getWarningDialog().show();
      localSettingInfo.setFirstLaunch(false);
    }
    this.mFootprint = ((Footprint)getIntent().getParcelableExtra("DATA"));
    this.titleText = ((TextView)findViewById(2131492892));
    this.titleText.setClickable(false);
    this.categroyData = ((TextView)findViewById(2131492911));
    this.textCreateDate = ((TextView)findViewById(2131492913));
    this.textCreateTime = ((TextView)findViewById(2131492914));
    this.categoryIcon = ((ImageView)findViewById(2131492910));
    this.addressText = ((TextView)findViewById(2131492901));
    this.buttonAddress = ((ImageView)findViewById(2131492917));
    this.phoneText = ((TextView)findViewById(2131492921));
    this.webText = ((TextView)findViewById(2131492925));
    this.buttonWeb = ((ImageView)findViewById(2131492924));
    this.buttonPhone = ((ImageView)findViewById(2131492920));
    this.buttonLocation = ((ImageView)findViewById(2131492930));
    this.rating = ((RatingBar)findViewById(2131492908));
    this.mMediaControl = ((MediaControlPanelViewMode)findViewById(2131492927));
    this.latText = ((TextView)findViewById(2131492931));
    this.lonText = ((TextView)findViewById(2131492932));
    this.mMap = ((MapView)findViewById(2131492962));
    this.mAddressPanel = findViewById(2131492916);
    this.mAddressPanel.setTouchDelegate(new TouchDelegate(new Rect(0, 0, 320, 100), this.buttonAddress));
    this.mPhonePanel = findViewById(2131492919);
    this.mPhonePanel.setTouchDelegate(new TouchDelegate(new Rect(0, 0, 320, 100), this.buttonPhone));
    this.mWebPanel = findViewById(2131492923);
    this.mWebPanel.setTouchDelegate(new TouchDelegate(new Rect(0, 0, 320, 100), this.buttonWeb));
    this.mLocationPanel = findViewById(2131492929);
    this.mLocationPanel.setTouchDelegate(new TouchDelegate(new Rect(0, 0, 320, 100), this.buttonLocation));
    this.mMediaDiv = ((ImageView)findViewById(2131492928));
    this.mPhoneDiv = ((ImageView)findViewById(2131492922));
    this.mWebDiv = ((ImageView)findViewById(2131492926));
    this.mAddrDiv = ((ImageView)findViewById(2131492918));
    this.textBox = ((TextView)findViewById(2131492936));
    java.text.DateFormat localDateFormat1 = android.text.format.DateFormat.getDateFormat(getApplicationContext());
    this.textCreateDate.setText(localDateFormat1.format(new Date(this.mFootprint.mCreateTime)));
    java.text.DateFormat localDateFormat2 = android.text.format.DateFormat.getTimeFormat(getApplicationContext());
    this.textCreateTime.setText(localDateFormat2.format(new Date(this.mFootprint.mCreateTime)));
    Category localCategory = FootprintManager.getInstance(getApplicationContext()).findCategory(this.mFootprint.mCategory);
    if (localCategory != null)
      this.categoryIcon.setImageDrawable(FootprintUtils.getCategoryIcon(this, localCategory.mKeyword));
    String str;
    boolean bool1;
    label747: boolean bool2;
    label808: boolean bool3;
    label869: ImageView localImageView4;
    if (localCategory != null)
    {
      TextView localTextView = this.categroyData;
      if (localCategory.mName != null)
      {
        str = localCategory.mName;
        localTextView.setText(str);
      }
    }
    else
    {
      this.addressText.setText(this.mFootprint.mAddr);
      ImageView localImageView1 = this.buttonAddress;
      if (this.mFootprint.mAccuracy <= 0)
        break label1284;
      bool1 = true;
      localImageView1.setEnabled(bool1);
      this.buttonAddress.setOnClickListener(this);
      this.phoneText.setText(this.mFootprint.mTel);
      ImageView localImageView2 = this.buttonPhone;
      if ((this.mFootprint.mTel == null) || (this.mFootprint.mTel.length() <= 0))
        break label1290;
      bool2 = true;
      localImageView2.setEnabled(bool2);
      this.buttonPhone.setOnClickListener(this);
      this.webText.setText(this.mFootprint.mSite);
      ImageView localImageView3 = this.buttonWeb;
      if ((this.mFootprint.mSite == null) || (this.mFootprint.mSite.length() <= 0))
        break label1296;
      bool3 = true;
      localImageView3.setEnabled(bool3);
      this.buttonWeb.setOnClickListener(this);
      localImageView4 = this.buttonLocation;
      if (this.mFootprint.mAccuracy <= 0)
        break label1302;
    }
    label1284: label1290: label1296: label1302: for (boolean bool4 = true; ; bool4 = false)
    {
      localImageView4.setEnabled(bool4);
      this.buttonLocation.setOnClickListener(this);
      this.photoView = ((ImageView)findViewById(2131492906));
      File localFile = null;
      if (this.mFootprint.mPicPath != null)
        localFile = new File(this.mFootprint.mPicPath);
      Bitmap localBitmap = FootprintImageManager.getInstance().getScaledImage(localFile, this, 120, 120, false);
      this.photoView.setImageBitmap(localBitmap);
      this.rating.setRating(this.mFootprint.mRate);
      this.textBox.setText(this.mFootprint.mComment);
      Log.d("FootprintDetailViewActivity", "mFootprint.mLatitude = " + this.mFootprint.mLatitude);
      Log.d("FootprintDetailViewActivity", "mFootprint.mLongitude = " + this.mFootprint.mLongitude);
      this.latText.setText(FootprintUtils.getFormatedLat(this.mFootprint.mLatitude));
      this.lonText.setText(FootprintUtils.getFormatedLon(this.mFootprint.mLongitude));
      this.mMap.getController().setCenter(this.mFootprint.getPoint());
      this.mMap.getController().setZoom(this.mMap.getMaxZoomLevel());
      this.mBalloonView = new ImageView(this);
      this.mBalloonView.setImageResource(2130837655);
      this.mBalloonView.setClickable(false);
      this.mMap.addView(this.mBalloonView, new MapView.LayoutParams(40, 40, this.mFootprint.getPoint(), 81));
      new Handler().postDelayed(new Runnable()
      {
        public void run()
        {
          FootprintDetailViewActivity.this.openMapView();
        }
      }
      , 500L);
      this.titleText.setText(this.mFootprint.mName);
      this.mStorageUtil = new StorageUtil(getApplicationContext());
      this.mStorageUtil.SetOnChangeStorageListerner(new StorageUtil.OnChangeStorageListener()
      {
        public void onStorageChanged(int paramInt)
        {
          if (paramInt > 1)
            FootprintDetailViewActivity.this.startActivity(FootprintUtils.getResetIntent());
        }
      });
      return;
      str = "";
      break;
      bool1 = false;
      break label747;
      bool2 = false;
      break label808;
      bool3 = false;
      break label869;
    }
  }

  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    paramMenu.add(0, 2, 2, getResources().getString(2131361825)).setIcon(2130837680);
    paramMenu.add(0, 0, 0, getResources().getString(2131361807)).setIcon(2130837679);
    paramMenu.add(0, 1, 1, getResources().getString(2131361808)).setIcon(2130837678);
    return true;
  }

  protected void onDestroy()
  {
    Log.d("FootprintDetailViewActivity", "onDestroy");
    this.mStorageUtil = null;
    super.onDestroy();
  }

  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    Intent localIntent;
    if (paramMenuItem.getItemId() == 0)
      localIntent = new Intent("com.htc.android.footprints.activity.FootprintDetailEditActivity");
    while (true)
    {
      try
      {
        localIntent.putExtra("DATA", this.mFootprint);
        startActivityForResult(localIntent, 33);
        return false;
      }
      catch (Exception localException)
      {
        Log.e("FootprintDetailViewActivity", "Disable to launch edit mode");
        continue;
      }
      if (paramMenuItem.getItemId() == 1)
      {
        HtcAlertDialog.Builder localBuilder = new HtcAlertDialog.Builder(this).setTitle(getString(2131361957)).setIcon(17301543);
        String str = getString(2131361816);
        Object[] arrayOfObject = new Object[1];
        arrayOfObject[0] = this.mFootprint.mName;
        localBuilder.setMessage(String.format(str, arrayOfObject)).setPositiveButton(2131361893, new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramDialogInterface, int paramInt)
          {
            paramDialogInterface.dismiss();
            FootprintUtils.deleteFootprint(FootprintDetailViewActivity.this.getApplicationContext(), FootprintDetailViewActivity.this.mFootprint);
            FootprintDetailViewActivity.this.finish();
          }
        }).setNegativeButton(2131361796, new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramDialogInterface, int paramInt)
          {
            paramDialogInterface.dismiss();
          }
        }).show();
        continue;
      }
      if (paramMenuItem.getItemId() != 2)
        continue;
      Footprint[] arrayOfFootprint = new Footprint[1];
      arrayOfFootprint[0] = this.mFootprint;
      FootprintUtils.exportKMZ(this, this.mFootprint.mName.replace(" ", "_"), arrayOfFootprint);
    }
  }

  protected void onPause()
  {
    Log.d("FootprintDetailViewActivity", "onPause");
    super.onPause();
    if (this.mMediaControl != null)
      this.mMediaControl.closeMediaPanel();
    if (this.mStorageUtil != null)
      this.mStorageUtil.closeStorgaeUtil();
  }

  protected void onResume()
  {
    Log.d("FootprintDetailViewActivity", "onResume");
    if (FootprintUtils.isResetByWidget())
    {
      Intent localIntent = new Intent(this, ListModeNewActivity.class);
      localIntent.setFlags(67108864);
      startActivity(localIntent);
      finish();
    }
    super.onResume();
    if (this.mMediaControl != null)
    {
      if (!FootprintUtils.checkAudioData(this.mFootprint))
        break label170;
      this.mMediaControl.setAudioData(this.mFootprint);
    }
    while (true)
    {
      if (this.mFootprint.mAccuracy > 0)
      {
        this.mMap.getController().setCenter(this.mFootprint.getPoint());
        this.mMap.getController().setZoom(this.mMap.getMaxZoomLevel());
      }
      handleVisibleItem();
      if ((this.connectionFailedText != null) && (networkConnected()))
      {
        this.mMap.removeView(this.connectionFailedText);
        this.connectionFailedText = null;
      }
      if (this.mStorageUtil != null)
        this.mStorageUtil.startStorageUtil();
      return;
      label170: this.mMediaControl.disableMediaControl();
    }
  }

  protected void onStart()
  {
    super.onStart();
  }

  protected void onStop()
  {
    super.onStop();
  }
}

/* Location:           E:\workspace\dex2java\dex-translator-0.0.9.3\HtcFootprints_dex2jar.jar
 * Qualified Name:     com.htc.android.footprints.activity.FootprintDetailViewActivity
 * JD-Core Version:    0.6.0
 */